package com.haochang.chunkvod.view.vod.ViewGroup;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

public class MyLLAddViewOnLayoutView extends LinearLayout
{

	private Context mContext;

	public MyLLAddViewOnLayoutView(Context context)
	{
		super(context);
		this.mContext = context;
	}

	public MyLLAddViewOnLayoutView(Context context, AttributeSet attrs)
	{
		super(context, attrs);
		this.mContext = context;
	}

	public MyLLAddViewOnLayoutView(Context context, AttributeSet attrs, int defStyle)
	{
		super(context, attrs, defStyle);
		this.mContext = context;
	}

	@Override
	protected boolean addViewInLayout(View child, int index, ViewGroup.LayoutParams params)
	{
		return super.addViewInLayout(child, index, params);
	}

	public void mAddViewInlayout(View child, int index, ViewGroup.LayoutParams params)
	{
		addViewInLayout(child, index, params);
	}

	public void mAddViewInlayout(View child)
	{
		int index = this.getChildCount();
		mAddViewInlayout(child, index);
	}

	public void mAddViewInlayout(View child, int index)
	{
		addViewInLayout(child, index, this.getLayoutParams());
	}
}
